<style>
.tree ul{margin-left:30px;border:1px solid #f4f4f4;}
.tree li{padding: 5px;}
</style>
<div class="layui-fluid">
    <div class="layui-card">
      <div class="layui-card-body">
        <form class="layui-form" action="<?=url('admingroup/add');?>">
          <div class="layui-form-item">
            <label class="layui-form-label">部门名称</label>
            <div class="layui-input-block">
              <input type="text" name="title" required lay-verify="required" placeholder="请输入部门名称" autocomplete="off" class="layui-input">
            </div>
          </div>
          <div class="layui-form-item">
            <div class="layui-input-block">
              <button class="layui-btn" lay-submit lay-filter="myform">立即提交</button>
              <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
          </div>
        </form>
      </div>
    </div>
</div>
<script>
layui.use(['jquery', 'form', 'layer'], function(){
      var $ = layui.$
      ,form = layui.form;
      //form.render();
   //全选节点
    layui.$('.all').on('change', function () {
        layui.$(this).parents("li").eq(0).find('input').prop('checked', this.checked);
    });
});
</script>
